<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

	<div id="sidebar">
		<a href="Index.jsp"><img id="logo" src="images/logo.gif" alt="" title="" /></a>
		<ul class="navigation">
			<table>
				<tr>
					<td>
						<h2 style="color: black;">
							Welcome <a href="#">${sessionScope.User.getDisplayName() }</a>
						</h2>
					</td>
					<td></td>
				</tr>
			</table>
			
			<c:choose>
				<c:when test="${sessionScope.User!= null}">
					<c:forEach items="${sessionScope.User.getMenus() }" var="menu">
						<c:choose>
							<c:when test="${param.page_call == menu.getPageCall()}">
								<li class="active"><a href="${menu.getMenuURL()}">${menu.getMenuName()}</a></li>
							</c:when>
							<c:otherwise>
								<li><a href="${menu.getMenuURL()}">${menu.getMenuName()}</a></li>
							</c:otherwise>
						</c:choose>
					</c:forEach>
					<li><a href="LogoutServlet">LOGOUT</a></li>
				</c:when>
				<c:otherwise>
					<c:forEach items="${applicationScope.DefaultUser.getMenus() }" var="menu">
						<c:choose>
							<c:when test="${param.page_call == menu.getPageCall()}">
								<li class="active"><a href="${menu.getMenuURL()}">${menu.getMenuName()}</a></li>
							</c:when>
							<c:otherwise>
								<li><a href="${menu.getMenuURL()}">${menu.getMenuName()}</a></li>
							</c:otherwise>
						</c:choose>
					</c:forEach>
				</c:otherwise>
			</c:choose>






			<%--
			
			<c:choose>
				<c:when test="${param.page_call == 'Index'}">
				<li class="active"><a href="Index.jsp">HOME</a></li></c:when>
				<c:otherwise><li><a href="Index.jsp">HOME</a></li></c:otherwise>
			</c:choose>
			
			<c:choose>
				<c:when test="${param.page_call == 'JoinWithMe'}">
					<li class="active"><a href="JoinWithMe.jsp">JOIN WITH ME</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="JoinWithMe.jsp">JOIN WITH ME</a></li>
				</c:otherwise>
			</c:choose>
			
			
			<c:choose>
				<c:when test="${param.page_call == 'TopView'}">
					<li class="active"><a href="TopView.jsp">TOP VIEW</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="TopView.jsp">TOP VIEW</a></li>
				</c:otherwise>
			</c:choose>
			
			<c:choose>
				<c:when test="${param.page_call == 'HotNews'}">
					<li class="active"><a href="HotNews.jsp">HOT NEWS</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="HotNews.jsp">HOT NEWS</a></li>
				</c:otherwise>
			</c:choose>
			
			<c:choose>
				<c:when test="${param.page_call == 'ShareWithMe'}">
					<li class="active"><a href="ShareWithMe.jsp">SHARE WITH ME</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="ShareWithMe.jsp">SHARE WITH ME</a></li>
				</c:otherwise>
			</c:choose>
			
			<c:choose>
				<c:when test="${param.page_call == 'OnTheWayWithMe'}">
					<li class="active"><a href="OnTheWayWithMe.jsp">ON THE WAY WITH ME</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="OnTheWayWithMe.jsp">ON THE WAY WITH ME</a></li>
				</c:otherwise>
			</c:choose>
			
			<c:choose>
				<c:when test="${param.page_call == 'ReviewWithMe'}">
					<li class="active"><a href="ReviewWithMe.jsp">REVIEW WITH ME</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="ReviewWithMe.jsp">REVIEW WITH ME</a></li>
				</c:otherwise>
			</c:choose>
			
			<c:choose>
				<c:when test="${param.page_call == 'UpdateNews'}">
					<li class="active"><a href="UpdateNews.jsp">UPDATE INFORMATION</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="UpdateNews.jsp">UPDATE INFORMATION</a></li>
				</c:otherwise>
			</c:choose>
			
			<c:if test="${sessionScope.User.getRole() == 'writer'}">
				<c:choose>
					<c:when test="${param.page_call == 'WriterWithYou'}">
						<li class="active"><a href="WriterWithYou.jsp">WRITER WITH YOU</a></li>
					</c:when>
					<c:otherwise>
						<li><a href="WriterWithYou.jsp">WRITER WITH YOU</a></li>
					</c:otherwise>
				</c:choose>
			</c:if>
			

			<c:choose>
				<c:when test="${param.page_call == 'Payment'}">
					<li class="active"><a href="Payment.jsp">PAYMENT</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="Payment.jsp">PAYMENT</a></li>
				</c:otherwise>
			</c:choose>

			<c:choose>
				<c:when test="${param.page_call == 'About'}">
					<li class="active"><a href="About.jsp">ABOUT ME</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="About.jsp">ABOUT ME</a></li>
				</c:otherwise>
			</c:choose>
 --%>
		</ul>
		<div class="connect">
			<a href="http://www.facebook.com/pages/Share-With-Me/492035730829446"
				class="facebook">&nbsp;</a> <a href="http://twitter.com/"
				class="twitter">&nbsp;</a> <a href="http://www.youtube.com/"
				class="vimeo">&nbsp;</a>
		</div>
		<div class="footenote">
			<span>&copy; Copyright &copy; 2012.</span> <span><a
				href="Index.jsp">J2K's Project for CI6001 Software Development
					Technology @NIDA</a><br> all rights reserved</span>
		</div>
	</div>
</body>
</html>